name: testing, building
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
jobs:
  pipeline:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [16.x]

    steps:
      - uses: actions/checkout@v2
      - name: Staring Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}
      - name: Install yarn
        run: npm i yarn -g
      - name: Install modules
        run: yarn
      - name: Build production project
        run: yarn build:prod
      - name: Unit testing
        run: yarn test:unit
